<div class="ares-main-content" ares-clean-kendo>
    <!--<h1 class="ares-page-header">收费项目浏览</h1>-->
    <style>
        #charge-item-edit-wrap .super-category-wrap {
            padding: 0px 20px;
            margin: 5px 0 5px 0;
        }
        #charge-item-edit-wrap .charge-item-module-switch {
             padding: 5px 15px;
         }

        #charge-item-edit-wrap .panel-default {
            margin-bottom: 10px;
        }
    </style>
    <div class="ares-page-content" id="charge-item-edit-wrap">
        <div class="table-responsive row">
            <div class="col-md-2">
                <div class="panel panel-default">
                    <div class="panel-heading" style="height:55px;padding-right:5px;padding-left:5px">
                        <h4 class="panel-title pull-left">收费项目分类</h4>
                    </div>
                    <div class="panel-body treeviewContainer" style="padding:0">
                        <div class="charge-item-module-switch" ng-show="isProductSaleEnabled" >
                            <input type="checkbox" id="common-item-check" ng-model="hasCommonItem"
                                   ng-click="selectChargeItemModule()"/>
                            <label for="common-item-check" style="margin: 0;">诊疗服务</label>
                            <input type="checkbox" id="sale-item-check" ng-model="hasSaleItem"
                                   style="margin-left: 2px"
                                   ng-click="selectChargeItemModule()"/>
                            <label for="sale-item-check" style="margin: 0;">商品销售</label>
                        </div>
                        <div class="super-category-wrap">
                            <input type="text" id="super-category-drop-down-list" style="width:100%">
                        </div>
                        <div kendo-tree-view="tree"
                             k-data-source="currentSelectCategoryTreeData"
                             k-on-change="onChangeCurrentCatagory(dataItem)"
                             style="overflow-y: auto; width: 100%;"
                             id="select-super-category-tree">
                            <span k-template>
                                {{dataItem.itemName}}
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-10" ng-hide="isAllCharge">
                <div class="panel panel-default">
                    <div class="panel-heading clearfix">
                        <h4 class="panel-title pull-left">{{currentChargeItemCatagory.itemName}}收费项目</h4>
                        <div class="pull-left" style="margin-right:5px">
                            <button class="btn btn-default" ng-disabled="isAllCharge"
                                    ng-click="onShowAllChargeItems()">
                                全部项目
                            </button>
                        </div>
                        <div class="pull-left input-group" style="width:100px; position:relative; margin-right:5px"
                             ng-show="isGridInit">
                            <select id="status-drop" kendo-drop-down-list
                                    k-on-change="onChangeStatus()"
                                    ng-model="status"
                                    style="width:100px;">
                                <option value="全部">全部</option>
                                <option value="启用" selected="selected">启用</option>
                                <option value="停用">停用</option>
                            </select>
                        </div>
                        <div class="pull-left input-group" style="width:300px; position:relative" ng-show="isGridInit">
                            <i class="glyphicon glyphicon-search"
                               style="position: absolute;left: 0;z-index:5;margin:8px 8px"></i>
                            <input id="category-charge-item" type="text"
                                   style="padding-left:28px; border-radius: 5px;"
                                   class="searchTerm search-default form-control"
                                   placeholder="请输入项目首字母/名称"
                                   ng-keyup="onSearchChargeItems($event)"
                                   ng-model="searchKeyWord" />
                        </div>
                        <div class="pull-right" ng-show="currentCategoryItem">
                            <button class="btn btn-primary" 
                                    ng-show="isShowChangeCategoryButton()"
                                    ng-click="onChangeCategoryByCurrentCategoryChargeItems()"
                                    ares-hide-when-parent="ChargeItem">
                                更换小类
                            </button>
                            <button class="btn btn-primary" ng-show="canChargeItemsUp() && isChargeItemEditAllowed"
                                    ng-click="onCurrentCategoryChargeItemsUp()" ares-hide-when-parent="ChargeItem">
                                上移
                            </button>
                            <button class="btn btn-primary" ng-show="canChargeItemsDown() && isChargeItemEditAllowed"
                                    ng-click="onCurrentCategoryChargeItemsDown()" ares-hide-when-parent="ChargeItem">
                                下移
                            </button>
                            <button class="btn btn-primary" ng-click="openEditChargeItemDialog()"
                                    ng-if="isShowCreateChargeItemButton()"
                                    ares-hide-when-parent="ChargeItem">
                                新增项目
                            </button>
                            <button class="btn btn-default" ng-click="onExportCurrentCategoryChargeItemsExcel()"
                                    ng-if="isChargeItemEditAllowed"
                                    ares-hide-when-parent="ChargeItem">
                                导出excel
                            </button>
                        </div>
                    </div>
                    <div class="panel-body" style="padding-top:10px">
                        <div id="current-catagory-charge-items-table" class="ares-data-table">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-10" ng-show="isAllCharge">
                <div class="panel panel-default">
                    <div class="panel-heading clearfix">
                        <h4 class="panel-title pull-left">全部项目</h4>
                        <div class="pull-left" style="margin-right:5px">
                            <button class="btn btn-default" ng-disabled="isAllCharge"
                                    ng-click="onShowAllChargeItems()">
                                全部项目
                            </button>
                        </div>
                        <div class="pull-left input-group" style="width:100px; position:relative; margin-right:5px"
                             ng-show="isGridInit">
                            <select id="status-drop" kendo-drop-down-list
                                    k-on-change="onChangeStatus()"
                                    ng-model="status"
                                    style="width:100px;">
                                <option value="全部">全部</option>
                                <option value="启用" selected="selected">启用</option>
                                <option value="停用">停用</option>
                            </select>
                        </div>
                        <div class="pull-left input-group" style="width:300px; position:relative" ng-show="isGridInit">
                            <i class="glyphicon glyphicon-search"
                               style="position: absolute;left: 0;z-index:5;margin:8px 8px"></i>
                            <input id="all-charge-item" type="text"
                                   style="padding-left:28px; border-radius: 5px;"
                                   class="searchTerm search-default form-control"
                                   placeholder="请输入项目首字母/名称"
                                   ng-keyup="onSearchChargeItems($event)"
                                   ng-model="searchKeyWord" />
                        </div>
                        <div class="pull-right">
                            <button class="btn btn-default" ng-click="onExportAllChargeItemsExcel()"
                                    ng-if="isChargeItemEditAllowed"
                                    ares-hide-when-parent="ChargeItem">
                                导出excel
                            </button>
                        </div>
                    </div>
                    <div class="panel-body" style="padding-top:10px">
                        <div id="all-charge-items-table" class="ares-data-table">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
